package com.yonyou.pmclouds.team.processor;

import com.yonyou.pmclouds.basecom.bp.processor.SingleProcessor;
import com.yonyou.pmclouds.basecom.exception.BusinessException;
import com.yonyou.pmclouds.project.entity.ProjectVO;
import com.yonyou.pmclouds.project.rmiitf.ProjectSimpleQuery;
import com.yonyou.pmclouds.team.entity.TeamMemberVO;

public class TeamInsertValidProcessor implements SingleProcessor<TeamMemberVO> {
    private ProjectVO projectVO;

    public TeamInsertValidProcessor(ProjectSimpleQuery query, String projectid) throws BusinessException {
        this.projectVO = query.queryProject(projectid);
    }

    @Override
    public void process(TeamMemberVO vo, TeamMemberVO orig) throws BusinessException {
        // 设置项目状态到项目成员
        vo.setProjectState(projectVO.getProjectState());
    }
}
